package com.toubutu.audio.admin.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.toubutu.audio.admin.dto.RoleDto;
import com.toubutu.audio.admin.dto.RolePermissionBindDto;
import com.toubutu.audio.admin.dto.UserRoleBindDto;
import com.toubutu.audio.admin.entity.Role;
import com.toubutu.audio.admin.vo.RoleVo;
import com.toubutu.common.PageUtils;


import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 戒燥
 * @since 2023-09-30
 */
public interface RoleService extends IService<Role> {
    PageUtils<RoleVo> getRolePageList(Long size, Long page);

    List<RoleVo> getAllRoles();
    Boolean deleteRoleById(Integer roleId);

    Boolean saveRole(RoleDto role);

    Boolean updateRole(RoleDto role);

    Boolean bindRoleToUser(UserRoleBindDto userRoleBindDto);

    Boolean bindRoleToPermission(RolePermissionBindDto rolePermissionBindDto);

    List<Integer> getBindPermissionIdsByRoleId(Integer roleId);

    RoleVo getRoleInfoById(Integer roleId);

    void enableRole(Integer roleId,Integer isEnable);

    Map<Integer,String> getRoleNameByRoleIds(List<Integer> roleIds);

    List<RoleVo> getUserRoles(Long userId);

    List<String> getPermissionCodeByRoleIds(List<Integer> roleIds);

}
